$(function() {
  let id = location.search.split('=')[1];
  console.log(id);
  $.ajax({
    url: 'http://localhost:3000/api/getdiscountproduct',
    data: { productid: id },
    success(res) {
      console.log(res);
      // console.log(template('tmp', { result: res.result }));
      $('.cu-content').html(template('tmp', { result: res.result }));
    }
  });
});
